package algorithm.search;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;

/**使用java队列
 *
 * @author bingo
 * @create 2018-03-02 16:09
 **/
public class QueueTest {

    public static void main(String[] args) {

        Queue queue = new  LinkedList();

        LinkedList linkedList   = new LinkedList();
        ArrayList arr = new ArrayList();
        linkedList.add("1");
        linkedList.add("2");
        linkedList.add("3");

        queue.offer("a");
        queue.offer("b");
        queue.offer("c");
        queue.offer("d");

        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.poll());

        System.out.println(linkedList.remove());
        System.out.println(linkedList.remove());
        System.out.println(linkedList.remove());




    }
}
